/*
 * PhonesSingletonFactory.h
 *
 *  Created on: 03 Ιουν 2010
 *      Author: Sartios
 */

#ifndef PHONESSINGLETONFACTORY_H_
#define PHONESSINGLETONFACTORY_H_

#include "../Phone/IPhone.h"

/**
 * Factory and singleton object which creates phones
 */
class PhonesSingletonFactory {
public:
	/**
	 * Returns the Singleton instance of this object
	 * \return PhonesSingletonFactory *, the current object
	 */
	static PhonesSingletonFactory * getInstance();

	/**
	 * Returns a new Phone object
	 * \param string *, the category of the phone which should agree with the attributes
	 */
	IPhone	*	getPhone(const string *category);

private:
	/**
	 * Sets const attributs to default values
	 */
	PhonesSingletonFactory(void);
	/**
	 * Deletes all the pointers
	 */
	~PhonesSingletonFactory(void);

	static PhonesSingletonFactory *instance_;

	const string *MOBILE;
	const string *FAX;
	const string *HOME;
};

#endif /* PHONESSINGLETONFACTORY_H_ */
